<script type="text/javascript">

function getID(id) {
	alert(id);
}

	 $.ajax({	            
		 			url: base + 'index.php/durak/cards_list_results',
		            data: "",
		            dataType: 'json',
		            success: function(data)
		            {
		            	
		            	alert('hi');
		          	}
		            });
		
</script>


	<p class="link">
			<?php
			echo anchor('durak','Login');
			echo nbs(1)."|".nbs(1);
			echo anchor('durak/register','Register');
			?>
	</p>


		<div id="body">
			<p class="name">Welcome!
				<strong>Guest</strong>
			</p>   
				
				<table id="cards">
						<tr>
							<td>
								<div class = "deck">
									<?php 
									for($x=0; $x <23; $x++)
									{
									//echo $card[$x].br(1);s
									echo '<img class="img_deck" onclick=getID('.$x.') id='.$x.' src="'.base_url().'public_html/Red_Back.png"; 
											style="margin: '.$x.'px 0px 0px '. $x.'px; z-index: '.-$x.'"/>';
									//echo '<img src="'.base_url().'public_html/guest/'.$card[$x].'";/>';
									}
									?>
									<img src="<?php echo base_url().'public_html/guest/'.$trumpCard;?>"/>
								</div>
							</td>
						</tr>
				</table> 

				<table id="players">
					<th>Player One (Your Cards)</th>
					<th>Player Two(Opponents Cards)</th>
						<tr>
							<td align="center">
								<?php for($x=0; $x <6; $x++)
								{
								echo '<img  onclick=getID('.$x.') src="'.base_url().'public_html/guest/'.$playerOne[$x].'";/>';
								}
								?>
							</td>

							<td align="center">
								<?php for($x=0; $x <6; $x++)
								{
								echo '<img src="'.base_url().'public_html/guest/'.$playerTwo[$x].'";/>';
								}
								?>
							</td>
						</tr>
				</table> 


				<table id="guest">
					<th>Battle Deck</th>
				</table> 

				<table id="guest">
					<th>Throw Deck</th>
				</table> 
		</div>



	<p class="footer">
		Page rendered in 
			<strong>{elapsed_time}</strong>
		seconds
	</p>
